package com.bjesc_b2c.app.appraiset.mvp.view.fragment;

import com.bjesc_b2c.app.appraiset.base.BaseFragment;

/**
 * Created by yidong on 2017/5/25.
 */

public class DemandCarFragment extends BaseFragment {
//    @Bind(R.id.iv_car_photo)
//    SimpleDraweeView simpleCarPhoto;
//    @Bind(R.id.tv_car_type)
//    TextView carTypeTv;
//    @Bind(R.id.tv_car_price)
//    TextView carPriceTv;
//    private DealerDialogListener dialogListener;
//    private CustomerDetailsBean.DemandCarBean demandCarBean;
//    @Override
//    public void onCreate(@Nullable Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        if (getArguments() != null) {
//            demandCarBean= (CustomerDetailsBean.DemandCarBean)getArguments().getSerializable("DemandCar");
//        }
//    }
//    @Override
//    public void onAttach(Activity activity){
//        super.onAttach(activity);
//        try{
//            dialogListener =(DealerDialogListener)activity;
//        }catch(ClassCastException e){
//            throw new ClassCastException(activity.toString()+"must implement DealerDialogListener");
//        }
//    }
//    @Nullable
//    @Override
//    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//        contentView = inflater.inflate(R.layout.fragment_demand_car,null);
//        return super.onCreateView(inflater, container, savedInstanceState);
//    }
//
//    @Override
//    public void initData() {
//
//    }
//
//    @Override
//    public void initView() {
//        if (demandCarBean != null) {
//            simpleCarPhoto.setImageURI(demandCarBean.getImg());
//            carTypeTv.setText(demandCarBean.getTitle());
//            carPriceTv.setText(demandCarBean.getOwner_price());
//        }
//    }
//
//    //    @Override
////    public void onHiddenChanged(boolean hidden) {
////        super.onHiddenChanged(hidden);
////        if (!hidden) {
////            if (getArguments() != null) {
////                demandCarBean= (CustomerDetailsBean.DemandCarBean)getArguments().getSerializable("DemandCar");
////                simpleCarPhoto.setImageURI(demandCarBean.getImg());
////                carTypeTv.setText(demandCarBean.getTitle());
////                carPriceTv.setText(demandCarBean.getOwner_price());
////            }
////
////        }
////    }
//@Override
//protected void doOnNext(RxBusBean rxBusBean) {
//    super.doOnNext(rxBusBean);
//    if (rxBusBean.getRequestMark().equals("DemandCar")){
//        demandCarBean = (CustomerDetailsBean.DemandCarBean)rxBusBean.getO();
//        if (demandCarBean != null){
//            simpleCarPhoto.setImageURI(demandCarBean.getImg());
//            carTypeTv.setText(demandCarBean.getTitle());
//            carPriceTv.setText(demandCarBean.getOwner_price());
//        }
//    }
//}
//    @OnClick({R.id.lin_car_info, R.id.tv_look_dealer, R.id.tv_sms_share, R.id.tv_car_maintain, tv_car_similar})
//    public void onClick(View view){
//        switch (view.getId()){
//            case R.id.lin_car_info:
//  startIntent(new Intent(getActivity(),CarDelailsActivity.class));
//
////              startIntent(new Intent(getActivity(),CarDetailsActivity.class));
//                break;
//            case R.id.tv_look_dealer:
//                if(dialogListener !=null){
//                    dialogListener.createDiaog();
//                }
//                break;
//            case R.id.tv_car_similar:
////                startIntent(new Intent(getActivity(),LikeDealersActivity.class));
//               Intent mIntent = new Intent(getActivity(),DemandCarActivity.class);
//                mIntent.putExtra("DATATYPE",2);
//                startIntent(mIntent);
//                break;
//        }
//
//    }
//    public interface DealerDialogListener{
//        void createDiaog();
//    }
}
